<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <%@include file="style.jsp" %>
    <%@include file="script.jsp" %>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/orderlang/distributor/css/new_activity.css"/>
    <title>我的订货郎</title>
    <script type="text/javascript">
    	var activityType = "${activityType}";
    </script>
</head>
<body onselectstart="return false">
<div id="container_1" style="height:100%">
    <div style="position: relative">
        <%@include file="header.jsp" %>
    </div>
    <div id="content" class="clearfix">
        <%@include file="left_menu.jsp" %>
        <!--内容部分-->
        <div class="right-content" style="margin:75px 50px 0 213px;">
            <p class="brand">
                <a class="now">商品</a>><a href="${pageContext.request.contextPath}/productActivity/listActivity">商品促销</a>><a class="now">${activityType}</a>><a class="now">添加活动商品</a>
            </p>
            <div class="tab clearfix">
                <div class="msg" id="msg" data-id="${productActivity.id}">活动信息</div>
                <div class="chose-product  active" id="chose-product" data-id="${productActivity.id}">添加活动商品</div>
                <div class="revise" id="revise" data-id="${productActivity.id}">修改活动价格</div>
            </div>
            <form class="chose-form" action="${pageContext.request.contextPath}/productActivity/listProductActivityProduct" method="POST">
                <div class="content chose-block" style="height: 700px">
                    <div class="search-box fl">
                        <input id="getProduct" type="text" placeholder="请输入商品名称/关键字/条形码" />
                        <input id="productActivityId" name="productActivityId" type="text" value="${productActivity.id }" style="display: none"/>
                        <span onclick="getProduct()"></span>
                    </div>
                    <div class="add-more fr">批量添加</div>
                    <table>
                        <thead>
                        <tr>
                            <td><s></s></td>
                            <td>商品图片</td>
                            <td>商品名称</td>
                            <td>编码</td>
                            <td>品牌</td>
                            <td>规格</td>
                            <td>标准</td>
                            <td>市场价</td>
                            <td>订货价</td>
                            <td>实际库存</td>
                            <td></td>
                        </tr>
                        </thead>
                        <tbody>
                        <c:forEach var="product" items="${findProductList }" >
                        <tr id="${product.id }">
                            <td><s></s></td>
                            <td>
                                <div>
                                    <img src="${pageContext.request.contextPath}/img/1.jpg"/>
                                </div>
                            </td>
                            <td>${product.productName}</td>
                            <td>${product.code}</td>
                            <td>${product.brandName}</td>
                            <td>${product.specNameValue}</td>
                            <td>${product.standard }</td>
                            <td>${product.price}/${product.littleUnit}</td>
                            <td>${product.orderedPrice}/${product.littleUnit}</td>
                            <td><span>${product.actualInvertory}</span>${product.littleUnit}</td>
                            <td>
                                <button class="add-product" onclick="addProduct(this)">添加</button>
                                <button class="detail" onclick="productDetail(${product.id})" >详情</button>
                            </td>
                        </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                    <div class="fix-btn">
                    	<c:if test="${activityType == '新增活动' }">
                        	<input type="submit" class="submit" value="下一步"/>
                        </c:if>
                        <c:if test="${activityType == '修改活动' }">
                        	<input type="submit" class="submit" value="保存"/>
                        </c:if>
                        <input type="reset" id="reset" class="reset" value="取消"/>
                    </div>
                </div>
                <input type="hidden" name="activityType" value="${activityType}">
            </form>
        </div>
        <script src="${pageContext.request.contextPath}/static/orderlang/distributor/js/new_activity.js"></script>
        <!--内容部分结束-->
    </div>
</div>

</body>
</html>